package com.yjt.termworks.sql;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class MyHelper extends SQLiteOpenHelper {

    public MyHelper(Context context){
        super(context,"circletwo.db",null,1);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        db.execSQL("CREATE TABLE CIRCLE(_id INTEGER PRIMARY KEY AUTOINCREMENT,username VARCHAR(20)," +
                "avatar VARCHAR(20),circleImagesList VARCHAR(200),circleMsg  VARCHAR(200)," +
                "likeNum INTEGER,circleComment VARCHAR(20))");

        db.execSQL("CREATE TABLE USER(_id INTEGER PRIMARY KEY AUTOINCREMENT,username VARCHAR(20)," +
                "phone VARCHAR(20),password VARCHAR(200),avatar VARCHAR(20),cover VARCHAR(20),type VARCHAR(20))");
    }

    @Override
    public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) {

    }
}
